/**
 * @fileoverview Blocks for the Sphero Blockly modification.
 *
 * @license Copyright 2016 The Coding with Chrome Authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * @author mbordihn@google.com (Markus Bordihn)
 */
{namespace cwc.soy.sphero.Blocks autoescape="strict"}



/**
 * Blockly blocks.
 */
{template .toolbox}
  <xml>
    <category name="Movements" colour="120">
      <block type="sphero_sphero2_roll">
        <value name="speed">
          <block type="math_number"><field name="NUM">40</field></block>
        </value>
      </block>
      <block type="sphero_sphero2_heading"></block>
      <block type="sphero_sphero2_stop"></block>
    </category>

    <category name="Movements (Advance)" colour="120">
      <block type="sphero_sphero2_roll_step">
        <value name="speed">
          <block type="math_number"><field name="NUM">40</field></block>
        </value>
      </block>
      <block type="sphero_sphero2_roll_time">
        <value name="time">
          <block type="math_number"><field name="NUM">2</field></block>
        </value>
        <value name="speed">
          <block type="math_number"><field name="NUM">40</field></block>
        </value>
      </block>
    </category>

    <category name="Lights" colour="130">
      <block type="sphero_sphero2_rgb">
        <value name="colour">
          <block type="colour_picker">
            <field name="COLOUR">#ff0000</field>
         </block>
        </value>
      </block>
      <block type="sphero_sphero2_backlight"></block>
    </category>

    <category name="Events" colour="120">
      <block type="sphero_sphero2_collision"></block>
    </category>

    <sep></sep>

    {call cwc.soy.Blocks.defaultMessengerBlocks /}

    <sep></sep>

    {call cwc.soy.Blocks.defaultBlocks /}

    <sep></sep>

    {call cwc.soy.Blocks.defaultAdvancedBlocks /}

  </xml>
{/template}
